package cn.duwey.scs.common.base;

import javax.transaction.Transactional;

public interface IBaseService<T extends BaseEntity> {

    T findByPrimaryKey(Long id);

    T save(T entity);

    Iterable<T> saveAll(Iterable<T> entities);

    void update(T entity);

    void deleteByPrimaryKey(Long id);

    void delete(T entity);

    void deleteAll(Iterable<T> entities);

    void deleteAll();

    void deleteAllInBatch();
}
